<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LQBCMS-销售管理后台系统</title>
<meta name="keywords" content="{$Think.lang.keywords}" />
<meta name="description" content="{$Think.lang.description}">
<meta property="qc:admins" content="216527623560116167226375" />
<link rel="stylesheet" type="text/css" href="__STATIC__/Css/table_form.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/Css/login.css" />

<script src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/jquery.form.js"></script>
<script src="/Public/js/main.js"></script>
<script type="text/javascript" src="/Public/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/artDialog/plugins/iframeTools.js"></script>

</head>
<body id="login">
<div id="mainbox">
  <div class="logo">
    <div class="des">{$Think.config.SITE_TITLE}<br />
      <span></span></div>
    <div class="text"><!-- 技术支持：{$Think.config.COMPANY_TEL} &nbsp;&nbsp;QQ：252588119 --></div>
  </div>
  <div class="content">
    <div class="form">
      <div class="title">请在这里登陆</div>
      <form  name="myform" id="myform" method="POST" action="__MODULE__/login/login">
        <p>
          <label>用 户：</label>
          <input name="uname" type="text" size="25" id="username" class="input-text" placeholder="请输入用户名" />
          <span class="onShow"></span></p>
        <p>
          <label>密 码：</label>
          <input name="upass" type="password" size="25" id="password" class="input-text" placeholder="请输入密码" />
          <span class="onShow"></span></p>
        <p>
          <label>验证码：</label>
          <span class="vertify">
          <input name="verify_code" id="verify" type="text" size="8" class="input-text" style="width: 50px;" placeholder="验证码" />
          <img id="verifyImg" src="__APP__/Public/verify" onClick="Verify(this)"  ALT="点击刷新验证码" width="60" height="30" />
          <span class="onShow"></span></span></p>
        <p>
        <!--<p style="height:60px;"></p>-->
          <input name="Submit2" type="submit" id="dosubmit" class="submit" value="确认登陆" />
          <!-- <a href="http://crm.haifangzj.com/login/qq_login/"><img src="/Public/Images/qq_login.png" height="26" style="margin-top:10px;"></a> -->
        </p>
      </form>
    </div>
    <div class="picbox"><img src="__STATIC__/Images/login/membership.jpg" /></div>
    <div class="bot"></div>
  </div>
  <div class="copyright">© 2013 CopyRight  {$Think.config.COMPANY_NAME}</div>
</div>
</body>
</html>
<script type="text/javascript">

$(function(){
	$('#myform').ajaxForm({
		beforeSubmit:  checkForm,
		success: complete,
		dataType: 'json'
	});
	function checkForm(){

		var user = $("input[name='uname']").val().length;
		var pwd  = $('#password').val().length;
		var code = $('#verify').val();

		if( user < 2){
			art.dialog({id:'TNCICC',content: '用户名不能小于2个字符!',time: 2,icon:'warning'});
			return false;
		}else if( pwd < 5 ){
			art.dialog({id:'TNCICC',content: '密码不能少于5个字符!',time: 2,icon:'warning'});
			return false;
		}else if(code==''){
			//art.dialog({id:'TNCICC',content: '验证码不能为空!',time: 2,icon:'warning'});
			//return false;
		}else if( isNaN(code)){
			//art.dialog({id:'TNCICC',content: '验证码必须为数字!',time: 2,icon:'warning'});
			//return false;
		}else{
			return true;
		}

	}
	function complete(data){
		if(data.status==1){
			art.dialog.tips("正在登陆...",30);
			top.location.href='__ROOT__';
		}else{
			art.dialog({id:'TNCICC',content: data.info,time: 2,icon:'warning'});
			return false;
		}
	}
})

function Verify(obj){ //重载验证码
	var timenow = new Date().getTime();
	obj.src= '__APP__/Public/verify/'+timenow;
}
</script>
